load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "column",
    srcs = [
        "column.go",
        "convert.go",
        "result_encoder.go",
    ],
    importpath = "github.com/pingcap/tidb/server/internal/column",
    visibility = ["//server:__subpackages__"],
    deps = [
        "//parser/ast",
        "//parser/charset",
        "//parser/mysql",
        "//server/err",
        "//server/internal/dump",
        "//server/internal/util",
        "//types",
        "//util/chunk",
        "//util/hack",
        "//util/logutil",
        "@org_uber_go_zap//:zap",
    ],
)

go_test(
    name = "column_test",
    timeout = "short",
    srcs = [
        "column_test.go",
        "result_encoder_test.go",
    ],
    embed = [":column"],
    flaky = True,
    shard_count = 5,
    deps = [
        "//parser/charset",
        "//parser/mysql",
        "//server/internal/util",
        "//types",
        "//util/chunk",
        "//util/mock",
        "@com_github_stretchr_testify//require",
    ],
)
